-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Autocomplete] Support ChipComponent
type
#37112
[Autocomplete] Support ChipComponent
type
#37112
Conversation
Netlify deploy previewhttps://deploy-preview-37112--material-ui.netlify.app/ Bundle size report |
@@ -293,4 +293,5 @@ export default function Autocomplete< | |||
Multiple extends boolean | undefined = false, | |||
DisableClearable extends boolean | undefined = false, | |||
FreeSolo extends boolean | undefined = false, | |||
>(props: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>): JSX.Element; | |||
ChipComponent extends React.ElementType = 'div', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be:
ChipComponent extends React.ElementType = 'div', | |
ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'], |
Same in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed
It also fixes #33788 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
fixes #33788
before: https://codesandbox.io/s/tender-sun-04j5wj?file=/src/CustomAutocomplete.tsx
after: https://codesandbox.io/s/upbeat-bhaskara-66yqp6?file=/src/CustomAutocomplete.tsx
obeserve typescript error in line 91 in before sandbox, that error is fixed in after sandbox